import { request } from '@/utils/request'

export function loginMiniProgram(data) {
	return request({
		url: '/v1/user/login',
		method: 'POST',
		data: data
	})
}

export function loadUserInfo() {
	return request({
		url: '/v1/user/info',
		method: 'GET'
	})
}

export function loadWallet() {
	return request({
		url: '/v1/user/wallet',
		method: 'GET'
	})
}

export function info(data) {
	return request({
		url: '/v1/user/info',
		method: 'PUT',
		data
	})
}

export function billslist(data) {
	return request({
		url: '/v1/garage-kit/game/bills',
		method: 'GET',
		data
	})
}

export function pkrecordlist(data) {
	return request({
		url: '/v1/garage-kit/pk/my/record',
		method: 'GET',
		data
	})
}

export function addresslist(data) {
	return request({
		url: '/v1/user/address',
		method: 'GET',
		data
	})
}

export function addaddress(data) {
	return request({
		url: '/v1/user/address',
		method: 'POST',
		data
	})
}

export function editaddress(data) {
	return request({
		url: '/v1/user/address',
		method: 'PUT',
		data
	})
}

export function deleteaddress(data) {
	return request({
		url: '/v1/user/address',
		method: 'DELETE',
		data
	})
}

export function addressdetail(data) {
	return request({
		url: '/v1/user/address/one',
		method: 'GET',
		data
	})
}

export function couponlist(data) {
	return request({
		url: '/v1/coupon/list',
		method: 'GET',
		data
	})
}

export function listMyCouponlist(data) {
	return request({
		url: '/v1/coupon/mine',
		method: 'GET',
		data
	})
}

export function walletrecord(data) {
	return request({
		url: '/v1/user/wallet/record',
		method: 'GET',
		data
	})
}
export function complain(data) {
	return request({
		url: '/v1/user/complain',
		method: 'POST',
		data
	})
}